Rational Root Lemma

Theorem

Suppose

f(z)=anzn+an1zn1++a1z+a0

is a polynomial with integer coefficients ai. If f has a rational root pq written in lowest form then

pa0andqan.

Using the divisor counting function, this narrows down the number of possible rational roots to check to at most 2d(a0)d(an) where the 2 comes from both positive and negative cases. Because of this, any common factor of the coefficients should be removed to reduce the number of possible cases to check.

Similarly, any rational polynomial can have it's denominators cleared such that the above theorem applies.

Proof

Suppose pq is a rational root of f with gcd(p,q)=1. This means that

f(pq)=an(pq)n+an1(pq)n1++a1(pq)+a0=0.

Multiplying through by qn leads to an equation

(1)anpn+an1pn1q++a1pqn1+a0qn=0.

As such, moving anpn to the other side and factoring out q we have that

q(an1pn1++a1pqn2+a0qn1)=anpn.

Given that both sides of this equation are integers, we can conclude that qanpn and hence that qan by Euclid's lemma and the fact that gcd(p,q)=1.

We can also, from (1), move a0qn to the other side and factor out the q to conclude similarly that pa0.